import List from "./List"

function App() {
  const fruits = [
    {id:1,name:"apple",calories:95},
    {id:2,name:"orange",calories:45},
    {id:3,name:"banana",calories:60},
    {id:4,name:"pineapple",calories:37}
  ];
  const vegetables = [
    {id:1,name:"apple",calories:95},
    {id:2,name:"orange",calories:45},
    {id:3,name:"banana",calories:60},
    {id:4,name:"pineapple",calories:37}
  ];
  return (
    <>
      {fruits.length > 0 && <List items = {fruits} category="Fruit"/>}
      {vegetables.length > 0 &&<List items = {vegetables} category="vegetables"/>}
      <List/>
    </>
    
  )
}

export default App
